﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace ServiceLayer
{
    [DataContract]
    public class CarDriverDTO
    {

        [DataMember]
        public DateTime From { get; set; }

        [DataMember]
        public DateTime To { get; set; }

        [DataMember]
        public DriverDTO Driver { get; set; }

        internal CarDriverDTO(BusinessLayer.CarDriver carDriver)
        {
            From = carDriver.From;
            To = carDriver.To;
            Driver = new DriverDTO(carDriver.Driver);
        }
    }
}